package JavaBase;


/**
 * Created by 王念 on 2016/4/17.
 */
public class Tset {

    public static void main(String[] args) {
        test3();
    }

    /**
     * a=a++ 先赋值再++
     */
    public static void test1() {
        int a = 0;
        for (int i = 0; i < 100; i++) {
            a = a++;
        }
        System.out.printf(String.valueOf(a));
    }

    /**
     * float和double不适合精确的运算
     */
    public static void test2() {
        float a = 1.1F;
        double b = 2.4;
        double c = 1.5;
        System.out.println(b - c);
    }

    /**
     * 先打印try  再finally 最后 返回 try
     */
    public static String test3() {
        try {
            System.out.println("try");
            return "try";
        } catch (Exception ex) {
            return "catch";

        } finally {
            System.out.println("finally");
            return "finally";
        }
    }


}
